/*
 * IPhone.java
 * Copyright (C) Jul 11, 2012 Bora SAYINER
 *
 * This file is part of Design Patterns.
 *
 * Design Patterns is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 *
 * Design Patterns is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Design Patterns. If not, see http://www.gnu.org/licenses/.
 */
package net.samples.abstractFactory;

/**
 * 
 * @author Bora SAYINER
 * @since Jul 11, 2012
 * @version 1.0.0
 */
public class IPhone implements AbstractFactory {

	private final IBattery battery = new MediumVoltage();
	private final IScreen screen = new MediumScreen();
	private final IKeypad keypad = new TouchPad();

	@Override
	public String getBattery() {
		return battery.getBattery();
	}

	@Override
	public String getscreen() {
		return screen.getScreenSize();
	}

	@Override
	public String getKeypad() {
		return keypad.getKeypad();
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(getClass().getSimpleName() + " ");
		builder.append("[Battery = " + battery.getBattery());
		builder.append(" Screen = " + screen.getScreenSize());
		builder.append(" Keypad = " + keypad.getKeypad());
		builder.append("]");
		return builder.toString();
	}

}
